package PTA.Mianxiangduixiang.ex16;

import java.util.ArrayList;

public class ex16 {
    private ArrayList slist = new ArrayList();

    public void addStudent(Student s) {
        this.slist.add(s);
    }
//
//    public void showStudent(){
//        for(Student s:slist){
//            System.out.println(s);
//        }
//    }
//
//    public static void main(String[] args) {
//        Main t = new Main();
//        t.addStudent(new Student("2016001","rose",18));
//        t.addStudent(new Student("2016002","hunifu",19));
//        t.addStudent(new Student("2016003","britsh",20));
//        t.addStudent(new Student("2016004","sunni",17));
//        t.showStudent();
//    }
//}
}
class Student {
    //补全代码处
    String date;
    String name;
    int age;

    @Override
    public String toString() {
        return   date+" "+name+" "+age;
    }

    public Student(String date, String name, int age) {
        this.date = date;
        this.name = name;
        this.age = age;
    }
}